package cn.kent.decoratorPattern;

/**
 * 目的：让子类对封装 SchoolReport 的子类，重写report方法，
 * @author kent
 * @date 2021/6/28 17:16
 */
public abstract class Decorator extends SchoolReport {
    private SchoolReport sr;

    /**
     * 构造函数传成绩单过来
     *
     * @param sr 成绩单
     */
    public Decorator(SchoolReport sr) {
        this.sr = sr;
    }

    @Override
    public void report() {
        this.sr.report();
    }

    @Override
    public void sign(String name) {
        this.sr.sign(name);
    }
}
